# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=mdbtools
pkgver=738.823b32f
pkgrel=1
groups=('blackarch' 'blackarch-forensic')
pkgdesc='Utilities for viewing data and exporting schema from Microsoft Access Database files.'
arch=('x86_64' 'aarch64')
url="https://github.com/evanmiller/mdbtools"
license=('GPL2')
makedepends=('git' 'bison' 'flex' 'txt2man' 'autoconf')
options=('!libtool' '!makeflags')
source=("git+https://github.com/evanmiller/$pkgname.git#branch=buffer-overflow")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  autoreconf -i -f

  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  rmdir "$pkgdir/usr/share/man/mant"
}

